<?php
namespace app\command\command;

use think\console\Command;
use think\console\Input;
use think\console\Output;
use think\Request;

class GatherPropertyList extends Command
{
    protected function configure()
    {
        $this->setName('GatherPropertyList')
            ->setDescription('采集国有资产列表数据');
    }

    protected function execute(Input $input, Output $output)
    {
        // 模拟请求调用前台控制器接口
        $request = Request::instance();
        $request->module('index'); // 指定前台模块名

        // 手动调用控制器方法
        $controller = controller('index/Gather');
        $controller->gatherPropertyList();
    }
}
